home *** CD-ROM | disk | FTP | other *** search
- Path: qualcomm.com!usenet
- From: nabbasi@qualcomm.com (Nasser Abbasi)
- Newsgroups: comp.lang.ada,comp.lang.c,comp.lang.c++
- Subject: programming in the large. C++ vs Ada . was: Re: C/C++ knocks the crap out of Ada
- Date: 7 Feb 1996 10:37:31 GMT
- Organization: QUALCOMM
- Message-ID: <4f9vdb$p1g@qualcomm.com>
- References: <4etcmm$lpd@nova.dimensional.com> <JSA.96Feb7021245@organon.com>
- NNTP-Posting-Host: nabbasi.qualcomm.com
- Mime-Version: 1.0
- X-Newsreader: WinVN 0.93.14
-
-
-
- JRFisher (jrfisher@aol.com) wrote:
- > :...
- > : Truth is, Ada has its strengths and is (for certain projects)
- > : far superior to any other structured language. Ada is particularly
- > : good for large-scale development because a few systems engineers can
-
- Elliot replied:
-
- > Setting responsibility interfaces is also the correct way for large, or
- > complex projects using C++. It is also easy to specify such interfaces
- > using C++.
-
-
- I think some of the language experts out there need to summarize to us
- why Ada is considered better for large projects than C++.
-
- It seems to me the most important part to have a language
- considered suitable for large applications is the ability to
- separate the interface from the implementation and things like
- separate compilation. and to a lesser extent the ability
- to do code reuse through taking advantage of inheritance
- (i.e. child classes can share code from common parent class as an
- example) or though use of generic packages or templates.
-
-
- It seems to me that both Ada and C++ both do the above, so
- why exactly is it that Ada is considered to be better than
- C++ for large applications?
-
- Ada provides public interface that clients can build against, even
- before the implementation (body) part of the package of the
- interface is available.
-
- Also in C++, clients can #include the .h file for the class they
- wish to interface to, clients can look at the public part of the
- class to see what the interface looks like, and code against that
- (offcourse they can also see the private part but if one can use
- access that part of the class (legally), no harm is done!
-
- Ada does strong type checking to make sure the client call is
- consistent with what the package public interface is declared as.
- In C++, it also does type checking (I guess somewhat less strongly
- than Ada, because the primitives data types in C/C++ (short,long,char
- etc..) are all implicitly interchangeable with each others), and
- because it seems one can cast anything to anything, but still,
- C++ does do good type checking.
-
- Ada supports separate compilation, it also support child packages which
- is nice feature to allow one to expand a package without having those
- using the parent package to recompile if they do not use the new child
- package (I think that how I understand it to work).
-
- In C++, It also support separate compilation. in C++, there is no such
- thing as a package. in C++ the class is the master of everything,
- In Ada, the package is, and the tagged types (i.e. the C++ equivalent
- to class) lives inside the package. So, Ada has one higher construct
- which is a package, but I am not sure how that makes Ada more suitable
- for very large applications...
-
- I think a nice thing would be to make a table listing the attributes
- that are considered important for programming in the large, and give a
- grade to each language in that department (may be a weighted grade
- depending how important that attribute is), and add the score at the end,
- and see who wins :)
-
- I know this must have been talked about before, and there is I am sure
- papers written about programming in the large, but I was interested to
- know more about the differences in Ada and C++ in this aspect.
-
-
- thanks
- Nasser
-
-